/**
 * 
 */
package com.sx.feesunit.dao.impl;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.sx.core.BaseDao;
import com.sx.feesunit.dao.IPaymentsFeeDao;
import com.sx.feesunit.entity.PaymentsFeeEntity;
import com.sx.feesunit.entity.UserUnitEntity;

/**
 * @author Administrator
 *
 */
public class PaymentsFeeDao extends BaseDao implements IPaymentsFeeDao {
	private Log log = LogFactory.getLog(this.getClass());
	/* (non-Javadoc)
	 * @see com.sx.feesunit.dao.IPaymentsFeeDao#addPaymentFees(com.sx.feesunit.entity.PaymentsFeeEntity)
	 */
	public Integer addPaymentFees(PaymentsFeeEntity payments) throws Exception {
		// TODO Auto-generated method stub
		return super.addInfo(payments, "PaymentsFee.addPaymentsFeeInfo");
	}

	/* (non-Javadoc)
	 * @see com.sx.feesunit.dao.IPaymentsFeeDao#deletePaymentFees(com.sx.feesunit.entity.PaymentsFeeEntity)
	 */
	public boolean deletePaymentFees(PaymentsFeeEntity payments) throws Exception {
		// TODO Auto-generated method stub
		return super.delInfo(payments, "PaymentsFee.deletePaymentsFeeInfo");
	}

	/* (non-Javadoc)
	 * @see com.sx.feesunit.dao.IPaymentsFeeDao#findPaymentFeesInfo(com.sx.feesunit.entity.PaymentsFeeEntity)
	 */
	public List<PaymentsFeeEntity> findPaymentFeesInfo(PaymentsFeeEntity paymentsfee)
			throws Exception {
		List<PaymentsFeeEntity> list = new ArrayList<PaymentsFeeEntity>();
		try {
			list = super.getSqlMapClientTemplate().queryForList("PaymentsFee.queryAll",paymentsfee);
		} catch (Exception e) {
			log.error("分页查询用户And连接失败",e);
		}
		return list;
	}

	/* (non-Javadoc)
	 * @see com.sx.feesunit.dao.IPaymentsFeeDao#findPaymentFeesInfoByAndCondiction(com.sx.feesunit.entity.PaymentsFeeEntity)
	 */
	public List<PaymentsFeeEntity> findPaymentFeesInfoByAndCondiction(
			PaymentsFeeEntity paymentsfee) throws Exception {
		List<PaymentsFeeEntity> list = new ArrayList<PaymentsFeeEntity>();
		try {
			list = super.getSqlMapClientTemplate().queryForList("PaymentsFee.findPaymentsFeeByAndCondiction",paymentsfee);
		} catch (Exception e) {
			log.error("分页查询用户And连接失败",e);
		}
		return list;
	}

	/* (non-Javadoc)
	 * @see com.sx.feesunit.dao.IPaymentsFeeDao#findPaymentFeesInfoByOrCondiction(com.sx.feesunit.entity.PaymentsFeeEntity)
	 */
	public List<PaymentsFeeEntity> findPaymentFeesInfoByOrCondiction(
			PaymentsFeeEntity paymentsfee) throws Exception {
		List<PaymentsFeeEntity> list = new ArrayList<PaymentsFeeEntity>();
		try {
			list = super.getSqlMapClientTemplate().queryForList("PaymentsFee.findPaymentsFeeByOrCondiction",paymentsfee);
		} catch (Exception e) {
			log.error("分页查询计费信息OR连接失败",e);
		}
		return list;
	}

	/* (non-Javadoc)
	 * @see com.sx.feesunit.dao.IPaymentsFeeDao#updatePaymentFees(com.sx.feesunit.entity.PaymentsFeeEntity)
	 */
	public boolean updatePaymentFees(PaymentsFeeEntity payments) throws Exception {
		// TODO Auto-generated method stub
		return super.updateInfo(payments, "PaymentsFee.updatePaymentsFeeInfo");
	}

}
